package cn.itcast.day03.抽象类作为方法的参数和返回值;
/*
   抽象类作为方法的参数和返回值

 */
public class Test {
    public static void main(String[] args) {
        Teacher teacher = new Teacher();
        method01(teacher);

        Person person = method02();
        person.eat();

    }

    public static void method01(Person person){
        person.eat();
    }

    public static Person method02(){
        Teacher teacher = new Teacher();
        return teacher;
    }
}
